"""
@author: Shizuku
@file: 2022-12-11-pactice.py
@time: 2022/12/11 17:35
"""
from functools import reduce
n = [1, 2, 3, 4, 5, 6, 7]
print(reduce(lambda x, y: x*y, n))

print(list(filter(lambda x: x % 3 == 0, range(1, 101))))

print(list(map(lambda x: x*x, range(1, 11))))

s = 'asdf234GDSdsf23'
r = "".join(sorted(s, key=lambda x: (x.isdigit(),
                                     x.isdigit() and int(x) % 2 == 0,
                                     x.isupper(),
                                     x
                                     )))
print(r)

lst = [1, 4, 5, 9]
r1 = map(lambda x: str(x), lst)
print("".join(r1))
